import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('@/views/layout/layout.vue'),
      redirect: '/home',
      children: [
        {
          path: '/home',
          name: 'home',
          component: () => import('@/views/home/home.vue'),
          meta: {
            title: '首页',
          },
        },
        {
          path: '/about',
          name: 'about',
          component: () => import('@/views/about/about.vue'),
          meta: {
            title: 'about',
          },
        },
        {
          path: '/app/micro-vue-app3/:pathMatch(.*)*',
          name: 'micro-vue-app3',

          component: () => import('@/views/qiankun2/qiankun.vue'),
          meta: {
            title: 'micro-vue-app3',
          },
        },
      ],
    },
  ],
})

export default router
